package com.tmeone.erpone.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tmeone.erpone.entity.TCargo;
import com.tmeone.erpone.mapper.TCargoMapper;
import com.tmeone.erpone.service.ITCargoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TCargoServiceImpl extends ServiceImpl<TCargoMapper, TCargo> implements ITCargoService {

    @Autowired
    private TCargoMapper cargoMapper;

    @Override
    public IPage<TCargo> getPageCargos(IPage<TCargo> page) {
        return cargoMapper.pageTCargos(page);
    }

    /*@Override
    public List<TCargo> selectAllCargos() {
        return cargoMapper.selectAllCargos();
    }*/

    @Override
    public int updateCargoStatusById(String id,String status) {
        return cargoMapper.updateCargoStatusById(id,status);
    }

    @Override
    public List<TCargo> selectByCargoNoAndShelvesIdAndStatus(String cargoNo, String shelvesId, String status) {
        return cargoMapper.selectByCargoNoAndShelvesIdAndStatus(cargoNo,shelvesId,status);
    }

    @Override
    public List<TCargo> selectByShelvesId(String shelvesId) {
        return cargoMapper.selectByShelvesId(shelvesId);
    }


}
